﻿using System;
using System.Collections.Generic;
using System.Web.Mvc;
using ControleRepresentante.Logic;
using ControleRepresentante.Logic.Models;
using WebSite.ViewModels.Fields;
using WebSite.ViewModels.IndexViewModels;

namespace WebSite.ViewModels.ViewModelExtensions.IndexViewModelExtensions
{
    public static class FabricaTriviumIndexColumns
    {
        public static Guid IsTrivium = new Guid("0B90E7BC-74ED-4B8C-B6BB-98316A52EFDE");
    }

    public class FabricaTriviumIndexViewModel : IIndexViewModelExtension
    {
        public IEnumerable<IField> GetSearchFields()
        {
            return new IField[0];
        }

        public bool CanEditSpecific(ModelBase modelBase)
        {
            return true;
        }

        public bool CanDeleteSpecific(ModelBase modelBase)
        {
            return true;
        }

        public void RegisterColumns(IndexColumnDefinitionsCollection indexColumnDefinitionsCollection, IIndexColumnsProvider indexColumnsProvider)
        {
            indexColumnDefinitionsCollection.Register(indexColumnsProvider[FabricaTriviumIndexColumns.IsTrivium], x => ((Fabrica)x).FabricaTrivium.IsTrivium);
        }

        public IEnumerable<TabItem> GetTabs(HtmlHelper htmlHelper)
        {
            return new TabItem[0];
        }
    }
}